﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class book
    {
        public int no;
        public string name;
        public double money;
        public string cbs;
        public string zzxx;

        public book(int no, string name, double money, string cbs, string zzxx)
        {
            this.no = no;
            this.name = name;
            this.Money = money;
            this.cbs = cbs;
            this.zzxx = zzxx;
        }

        public double Money
        {
            get { return money; }
            set {
                if (value<0)
                {
                    money = 0;
                }
                else
                {
                    money = value;
                }
            }
        }
        public void book1()
        {
            Console.WriteLine("编号{0},书名{1}，价格{2},出版社{3},专业信息{4}", no, name, Money, cbs, zzxx);
        }
    }
}
